package com.algorithm.set;/*
 *@Author:DOWN
 *@Date:2022/2/17 9:42
 *@Comment:使用二分搜索树实现集合
 */

import com.algorithm.binarytree.Main;

public class ThreeRealizeSet<E extends Comparable<E>> implements SetInterface<E> {

    private Main<E> main;
    public ThreeRealizeSet(){
        main=new Main<>();
    }
    @Override
    public void add(E e) {
        main.add(e);
    }

    @Override
    public void remove(E e) {
        main.remove(e);
    }

    @Override
    public boolean contains(E e) {
        return main.contains(e);
    }

    @Override
    public int getSize() {
        return main.getSize();
    }

    @Override
    public boolean isEmpty() {
        return main.isEmpty();
    }
}
